<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>意达设计</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/style.css"/>

</head>
<body class="bodyBG">

<!-- header -->
<div class="header">
    <div class="nav" onclick="catePlay();"></div>
    <span>首页</span>
    <div class="hd_right">
        <a href="javascript:void(0);" onclick="searchPage();" class="hd_search"></a>
        <a href="javascript:void(0);" onclick="usercenterPlay();" class="hd_cnt"></a>
    </div>
</div>

<div class="swiper-container banner">
    <div class="swiper-wrapper" id='bannercon'>
       

    </div>
    <!-- <div class="swiper-button-prev"></div>
    <div class="swiper-button-next"></div> -->
</div>

<div class="menu_nav">
    <ul>
        <li>
            <a href="javascript:void(0);" onclick="morePlay(4,0);">
                <img src="../image/index/img-001.png">
                <p>推荐</p>
            </a>
        </li>
        <li>
            <a href="javascript:void(0);"  onclick="morePlay(5,0);">
                <img src="../image/index/img-002.png">
                <p>新到</p>
            </a>
        </li>
        <li>
            <a href="javascript:void(0);" onclick="seryPlay();">
                <img src="../image/index/img-003.png">
                <p>系列</p>
            </a>
        </li>
        <li>
            <a href="javascript:void(0);" onclick="morePlay(6,0);">
                <img src="../image/index/img-004.png">
                <p>促销</p>
            </a>
        </li>
        <li>
            <a href="javascript:void(0);" onclick="lsorderPlay();">
                <img src="../image/index/img-005.png">
                <p>历史</p>
            </a>
        </li>
    </ul>
</div>

<div class="currtit"><span>人气推荐</span><a href="javascript:void(0);" onclick="morePlay(4,0);">更多</a></div>
<div class="scolist">
    <ul id="tj">
        <li>
            <a href="javascript:void(0);" class="scolimg"><img src="../image/index/img-006.jpg"></a>
            <div class="scoltxt">
                <p>柏雅图人气单肩女包</p>
                <span>柏雅图单肩女包只为简约发热！</span>
            </div>
            <a href="javascript:void(0);" class="scolincrease"></a>
        </li>
        
    </ul>
</div>

<div class="currtit"><span>新到商品</span><a href="javascript:void(0);" onclick="morePlay(5,0);">更多</a></div>
<div class="newgood">
    <div class="newgood_left" id=''>
        <a href="javascript:void(0)"><img src="../image/index/img-007.jpg"></a>
        <p>HELEN手提时尚女包</p>
        <span>HELEN手提女包新品上市，全新手感，携带方</span>
    </div>
    <div class="newgood_right">
        <ul id='newest'>
            <li>
                <a href="javascript:void(0)"><img src="../image/index/img-009.jpg" style="width: 79.2px;height: 49.5px;"></a></li>
            
        </ul>
    </div>
</div>
<div class="clearfix"></div>

<div class="currtit"><span>系列商品</span><a href="javascript:void(0);" onclick="seryPlay()">更多</a></div>
<div class="series">
    <div class="series_left">
        <h4>【中国风系列】</h4>
        <p>充满中国古风的手提女包</p>
        <a href="javascript:void(0);"><img src="../image/index/img-014.png"></a>
    </div>
    <div class="series_right">
        <div class="serbox_n1">
            <div class="seb_l seb_lCo1">
                <h4>【摩登系列】</h4>
                <p>充满中国古风的手提女包</p>
            </div>
            <div class="seb_r"><img src="../image/index/img-015.png"></div>
        </div>
        <div class="serbox_n2">
            <div class="seb_l seb_lCo2">
                <h4>【少女风系列】</h4>
                <p>充满中国古风的手提女包</p>
            </div>
            <div class="seb_r"><img src="../image/index/img-016.png"></div>
        </div>
    </div>
</div>
<div class="clearfix"></div>

<div class="currtit"><span>促销商品</span><a href="javascript:void(0);" onclick="morePlay(6,0);">更多</a></div>
<div class="prolist">
    <ul id='cheap'>
        <li>
            <a href="javascript:void(0);"><img src="../image/index/img-017.jpg"></a>
            <p>莱夫时尚单肩斜跨女包</p>
            <span>HELEN手提女包新品上市，全新上市新品</span>
        </li>
        
    </ul>
</div>
<div class="clearfix"></div>

<div class="hisbox">
    <a href="javascript:void(0);" onclick="lsorderPlay(1)">
        <h4>历史订单</h4>
        <p>快速查看您的历史订单</p>
    </a>
</div>

<div class='usercenter'>
    <div class="nullbox"></div>
    <div class="scafoter">
        <a href="javascript:void(0);" onclick="index()" class="scftOn"><span></span>首页</a>
        <a href="javascript:void(0);" onclick="myorder(1)"><span></span>订单</a>
        <a href="javascript:void(0);" onclick="caiwu()"><span></span>财务</a>
        <a href="javascript:void(0);" onclick="usercenterPlay()"><span></span>我的</a>
    </div>
</div>

<div class='userapply'>
    <div class="footerBox1"></div>
    <div class="footer">
        <div class="footer_add">
            <div class="addCnt">
                <p id='cpyname'>公司名称：意达时尚外贸</p>
                <p id='cpyaddr'>公司地址：重庆市南坪惠工路1号</p>
                <p>客服热线：<a href="tel:023-8888-8866"  id='cpytel'>023-8888-8866</a></p>
            </div>
        </div>
        <div class="footer_btn"><a href="javascript:;" onclick='userapply()'>申请成为会员</a></div>
    </div>
</div>



</body>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../script/swiper.min.js"></script>
<script type="text/javascript" src="../script/adaptive.js"></script>
<script type="text/javascript" src="../script/tabs.js"></script>
<script type="text/javascript">
    window['adaptive'].desinWidth = 750;
    window['adaptive'].baseFont = 28;
    window['adaptive'].maxWidth = 750;
    window['adaptive'].init();


    function userapply () {
        if(isvip){
            //alert('您已是会员！');
            api.openWin({
                name: 'seryName',
                url: './userapply.html',
                pageParam: {
                    name: 'text'
                }
            }); 
        }else{
           api.openWin({
                name: 'seryName',
                url: './userapply.html',
                pageParam: {
                    name: 'text'
                }
            }); 
        }
        
        
    }

    function searchPage () {
        if(islogin){
            api.openWin({
                name: 'seryName',
                url: './search.html',
                pageParam: {
                   
                }
            });
        }else{
            alert(msg);
        }
        
        
    }
    // 系列
    function seryPlay () {
        if(islogin){
            api.openWin({
                name: 'seryName',
                url: './sery.html',
                pageParam: {
                   
                }
            });
        }else{
            alert(msg);
        }
        
        
    }
    
    // 所有商品列表
    function goodslistPlay () {
        api.openWin({
            name: 'goodslistName',
            url: './goodslist.html',
            pageParam: {
                name: 'text'
            }
        });
    }
    // 分类列表
    function catePlay () {
        if(islogin){
            api.openWin({
                name: 'seryName',
                url: './cate.html',
                pageParam: {
                   
                }
            });
        }else{
            alert(msg);
        }
        
    }
    
    // 历史订单
    function lsorderPlay (type) {
        if(islogin){
            api.openWin({
                name: 'lsorderName',
                url: './myorder.html',
                pageParam: {
                    type: type
                }
            });
        }else{
            alert(msg);
        }
        
    }

    // 导航
    function menuPlay(){
        api.actionSheet({
            cancelTitle: '取消',
            buttons: ['首页','菜单1','菜单2','菜单3']
        },function(ret,err){
            // api.alert({
            //     msg: '你刚点击了'+ret.buttonIndex
            // });
        });
    }
    function slide() {
        //api.openSlidPane({type: 'left'});
    }
    apiready = function () {
        $api.fixStatusBar($api.dom('.header'));
        api.addEventListener({
            name: 'keyback'
        }, function(ret, err){
            api.closeWidget();
        });
        api.showProgress();

        

if(islogin){
    $(".usercenter").show();
    $(".userapply").hide();
}else{
    $(".usercenter").hide();
    $(".userapply").show();
}

//var cart=JSON.stringify( arr );
  //alert(cart);
        var p={token:token,cart:1};

        api.ajax({
            url: webSiteUrl+'/app/public/index',
            method: 'post',
            data: {
                values:p,
            }
        }, function(ret, err) {
            api.hideProgress();
            
            if(ret.code==200){
                //alert(ret.msg);

                var cpy=ret.data.cpy;
                $("#cpyname").html('公司名称:'+cpy.name);
                $("#cpyaddr").html('公司地址:'+cpy.addr);
                $("#cpytel").html(cpy.tel);


               html = "";
               var tj=ret.data.banner;
               
for(var i=0;i<tj.length;i++){
    html += '<div class="swiper-slide"><img src="'+webSiteUrl+tj[i].icon+'" onclick="detailPlay('+tj[i].goodsid+')" style="max-height:200px;"></div>';        
}
$('#bannercon').html(html);

        var swiperBanner = new Swiper('.swiper-container', {
            //设置无缝
            loop:true,
            //设置自动滚动
            autoplay: 3000,
            //鼠标离开之后继续滚动
            autoplayDisableOnInteraction:false,
            //设置滚动速度
            speed:1000,
            //设置左右切换按钮
            //nextButton: '.swiper-button-next',
            //prevButton: '.swiper-button-prev',
            //显示个数
            freeMode: false,
        });
                  
                
                html = "";
                var tj=ret.data.tj;
                
for(var i=0;i<tj.length;i++){
html += '<li onclick="detailPlay('+tj[i].id+')"><a href="javascript:void(0);" class="scolimg"><img src="'+webSiteUrl+tj[i].icon+'"></a><div class="scoltxt"><p>'+tj[i].name+'</p><span>'+tj[i].content+'</span></div><a href="javascript:void(0);" class="scolincrease"></a></li>';
}
$('#tj').html(html);


               
var tj=ret.data.newest;
var a='<a href="javascript:void(0)"><img src="'+webSiteUrl+tj[0].icon+'" onclick="detailPlay('+tj[0].id+')"></a><p>'+tj[0].name+'</p><span>'+tj[0].content+'</span>';
$('.newgood_left').html(a);

var html = "";
for(var i=1;i<tj.length;i++){
   html += '<li onclick="detailPlay('+tj[i].id+')"><a href="javascript:void(0);" ><img src="'+webSiteUrl+tj[i].icon+'" style="width: 79.2px;height: 49.5px;"></a></li>';
}
$('#newest').html(html);




        var tj=ret.data.sery;


var a='<h4>【'+tj[0].name+'】</h4><p>'+tj[0].content+'</p><a href="javascript:void(0);"><img src="'+webSiteUrl+tj[0].icon+'" onclick="morePlay('+3+','+tj[0].id+')"></a>';
$('.series_left').html(a);


html = "";
for(var i=1;i<tj.length;i++){
   html += '<div class="serbox_n'+i+'" onclick="morePlay('+3+','+tj[i].id+')"><div class="seb_l seb_lCo'+i+'"><h4>【'+tj[i].name+'】</h4></div><div class="seb_r"><img src="'+webSiteUrl+tj[i].icon+'"></div></div>';
}
$('.series_right').html(html);


var tj=ret.data.cheap;
html = "";
for(var i=0;i<tj.length;i++){
html += '<li  onclick="detailPlay('+tj[i].id+')"><a href="javascript:void(0);"><img src="'+webSiteUrl+tj[i].icon+'"></a><p>'+tj[i].name+'</p><span>'+tj[i].content+'</span></li>';
}
$('#cheap').html(html);

    

        }else if(ret.code==201){
            api.alert({msg:('错误码：'+err.code+'；错误信息：'+err.msg+'网络状态码：'+err.statusCode)});
        }else{
            alert(400)
        }


        });


  };
  function myorder(type) {
        api.openWin({
            name: 'dealer5Name',
            url: './myorder.html',
            pageParam: {
                type: type
            }
        });
    } 
    function index() {
        api.openWin({
            name: 'slideName',
            url: './slide.html',
            pageParam: {
                
            }
        });
    }
    function order() {
        api.openWin({
            name: 'dealer11Name',
            url: './myorder.html',
            reload: true,
            pageParam: {
                type:1,
            }
        });
    }
    function caiwu() {
        api.openWin({
            name: 'dealer11Name',
            url: './caiwu.html',
            reload: true,
            pageParam: {
                
            }
        });
    }

</script>

</html>
